﻿@model MealBooking.Core.Models.Meals.Meal
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<ul data-role="listview" data-inset="true" data-mini="true">
    @{
        var meal = Model;
        var dishes = meal.Dishes;
        <li data-role="list-divider">
            <h4>
                @meal.Category.Name</h4>
        </li>         
        <li data-role="list-divider">Templates:</li>
        <li><a href="@Url.Action("TemplateDetail", "Meal", new { mealTemplateId = meal.Template.Id })">
            <h6>@meal.Template.Name</h6>
            <p>
                Price: @meal.Price</p>
        </a></li>
        <li data-role="list-divider">Dishes:<span class="ui-li-count">@dishes.Count</span></li>            
        foreach (var dish in dishes)
        {
        <li><a href="@Url.Action("DishDetail", "Dish", new { id = dish.Id })">
            <h4>@dish.Name</h4>
            <p>
                <span>@dish.Price</span></p>
        </a></li>        
        }
    }
</ul>
